package bookExercise;

import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class A14Map {
    public static void main(String[] args) {
        List<A14Emplyee> list =A14Emplyee.getEmpList();
        Stream<A14Emplyee> stream =list.stream();
        stream =stream.filter(n -> "开发部".equals(n.getDept()));
        Stream<String> name =stream.map(A14Emplyee::getName);
        List<String> collect =name.collect(Collectors.toList());
        for (String s : collect) {
            System.out.println(s);
        }
    }
}
